import Request from '../utils/http.js';

export default {
	//获取订单状态展示数据
	orderStatus: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/user_index',
			method: 'POST',
			params: params
		});
	},
	
	//退出登录
	loginOut: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/logout',
			method: 'POST',
			params: params
		});
	},
	
	//修改密码
	changepwd: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/changepwdV1', 
			method: 'POST',
			params: params
		});
	},
	
	//修改个人信息
	editUserInfo: function(params) {
		return Request.httpFormRequest({
			url: '/api/user/profile',
			method: 'POST',
			params: params
		});
	},
	
	//获取我的收藏
	getMyCollect: function(params) {
		return Request.httpFormRequest({
			url: '/api/user/getMyCollect',
			method: 'POST',
			params: params
		});
	},
	
	//取消收藏
	collectCancel: function(params) {
		return Request.httpFormRequest({
			url: '/api/user/cancelCollect',
			method: 'POST',
			params: params
		});
	},
	
	//获取优惠券列表
	getCouponList: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/service_voucher_list',
			method: 'POST',
			params: params
		});
	},
	
	//获取邀请列表
	newGetMyAllTeam: function(params) {
		return Request.httpTokenRequest({
			url: '/api/User/new_getMyAllTeam',
			method: 'POST',
			params: params
		});
	},
	
	//获取小程序码
	getWxCode: function(params) {
		return Request.httpTokenRequest({
			url: '/api/wechatqifu/code',
			method: 'POST',
			params: params
		});
	},
	
	//小程序用户分析
	getWechatClick: function(params) {
		return Request.httpTokenRequest({
			url: '/api/index/add_analysedata',
			method: 'POST',
			params: params
		});
	}
}